<?xml version="1.0" encoding="ISO-8859-1"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core">

    <p:panel id="mailViewPanel" header="Mail">
        <h:panelGrid columns="2">
            <h:outputLabel value="Sender:" for="sender"/>
            <p:inputText id="sender" readonly="true" value="#{mailListView.selectedMail.fromTo.from}"/>
            
            <h:outputLabel value="Receiver:" for="receiver"/>
            <p:inputText id="receiver" readonly="true" value="#{mailListView.selectedMail.fromTo.to}"/>
            
            <h:outputLabel value="Subject:" for="subject"/>
            <p:inputText id="subject" readonly="true" value="#{mailListView.selectedMail.subject}"/>
            
            <h:outputLabel value="Date:" for="date"/>
            <h:outputText id="date" value="#{mailListView.selectedMail.date}">
                <f:convertDateTime pattern="dd/MM/yyyy HH:mm"/>
            </h:outputText>
        </h:panelGrid>
        
        <ui:include src="mail_attachment.xhtml">
            <ui:param name="attachmentContainer" value="#{mailListView.attachmentContainer}"/>
            <ui:param name="allowAdding" value="false"/>
        </ui:include>
                
        <h:outputText escape="false" value="#{mailListView.selectedMail.message.message.toString()}"/>
    </p:panel>

</ui:composition>
